package cn.hfatec.dataSource;

/**
 * @author: panwb
 *
 * Date: 2016/8/5
 * Time: 14:42
 */
public class DataSourceHolder {

    private static ThreadLocal<String> dataSourceHolder = new ThreadLocal<String>();

    public static String getDataSource() {
        return dataSourceHolder.get();
    }

    public static void setDataSource(String dataSource) {
        dataSourceHolder.set(dataSource);
    }

    public static void clear() {
        dataSourceHolder.remove();
    }
}
